<?php
		namespace Admin\Controller;

		class ArgumentsController extends CommonController{

			public function index(){

				$model = D('Arguments');
				$arg = $model-> getAll();

				//发送评论数据
				$this->assign('arg',$arg);
				$this->display();
	
			}
	/*----------------评论审核通过-----------------*/

			public function auditOk(){	

				$id=$_GET['id'];
				$model = D('Arguments');


				$arg = $model-> auditk($id);
				if ($arg) {
					$this-> redirect('Arguments/index');
				}else{
					$this->error('审核失败');
				}
	
			}

/*----------------评论审核通过-----------------*/

			public function auditOn(){	

				$id=$_GET['id'];
				$model = D('Arguments');


				$arg = $model-> auditn($id);
				if ($arg) {
					$this-> redirect('Arguments/index');
				}else{
					$this->error('审核失败');
				}
	
			}

/*---------------------删除评论------------------------*/

			public function del(){	

				$id=I('get.id');
				$model = D('Arguments');

				$arg = $model-> delet($id);
				if ($arg) {
					$this-> redirect('Arguments/index');
				}else{
					$this->error('删除失败');
				}
				//$this->display();
	
			}



		}